﻿#include <iostream>
using namespace std;

class CA
{
private:
	int k;

public:
	void f() {cout << "CA::f" << endl;}
};

class CB : public CA
{
public:
	void f() {cout << "CB::f" << endl;}
};

class CC : public CA
{
public:
	void f() {cout << "CC::f" << endl;}
};

class CD : public CB, public CC
{

};

class VB : virtual public CA
{
public:
	void f() {cout << "VB::f" << endl;}
};

class VC : public virtual CA
{
public:
	void f() {cout << "VC::f" << endl;}
};

class VD : public VB, public VC
{

};